# _*_ coding : utf-8 _*_
# @Time : 2023/3/14 0014 16:48
# @Author : 菜鸟王小二
# @File : 2_urllib_下载
# @Project : python爬虫

import urllib.request

# 下载网页
# page_url = 'http://www.baidu.com'
# urllib.request.urlretrieve(page_url,'page.html')

# 下载图片
# img_url = 'https://img2.baidu.com/it/u=2784609881,154757556&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=1082'
# urllib.request.urlretrieve(img_url,'lisa.jpg')

# 下载视频
# video_url = 'https://vd4.bdstatic.com/mda-kg0pcztgi0rucsza/v1-cae/sc/mda-kg0pcztgi0rucsza.mp4?v_from_s=hkapp-haokan-hna&auth_key=1678785929-0-0-78510bf36ec3af02c22bd775bc0e3896&bcevod_channel=searchbox_feed&pd=1&cd=0&pt=3&logid=3328936771&vid=10392909521055706475&abtest=107354_2-107353_1&klogid=3328936771'
# urllib.request.urlretrieve(video_url,'lisa_video.mp4')